var myGuanJia = ({
	getContractList : function (){
		$.ajax({
			type : "POST",
			dataType : 'json',
			url : "../contract/getContractList",
			data : {
				userIdFlag: "1",
				pageSize: 50,
				pageNumber: 1
			},
			success : function(ret) {
				console.log(ret);
				$$.hidePreloader();
				var html = '';
				if(ret.rows && ret.rows.length>0){
					if(ret.flag ==1){
						$.each(ret.rows,function(i,n){
							console.log(n.houseAddress);
							html += '<li class="item-content item-link" onclick="myGuanJia.toLink(\'../jsp/myGuanjia.html?contractId='+n.contractId+'\')">'+
								        '<div class="item-media"><i class="icon icon-f7"></i></div>'+
								        '<div class="item-inner">'+
								          '<div class="item-title"><span style="vertical-align:-webkit-baseline-middle">'+n.houseAddress+"合同</span>"+(n.status==1?"<img style='width: 30px;margin-left: 10px;vertical-align: -webkit-baseline-middle;' src='../images/sessage.png'>":"<img style='width: 30px;margin-left: 10px;vertical-align: -webkit-baseline-middle;' src='../images/nosessage.png'>")+'</div>'+
								        '</div>'+
								     '</li>';
						});
					}else{
						$.each(ret.rows,function(i,n){
							html += '<li class="item-content item-link" onclick="myGuanJia.toLink(\'../jsp/myGuanjia.html?contractId='+n.contract_id+'\')">'+
								        '<div class="item-media"><i class="icon icon-f7"></i></div>'+
								        '<div class="item-inner">'+
								          '<div class="item-title"><span style="vertical-align:-webkit-baseline-middle">'+n.renter_addr+"合同</span>"+(n.status==1?"<img style='width: 30px;margin-left: 10px;vertical-align: -webkit-baseline-middle;' src='../images/sessage.png'>":"<img style='width: 30px;margin-left: 10px;vertical-align: -webkit-baseline-middle;' src='../images/nosessage.png'>")+'</div>'+
								        '</div>'+
								     '</li>';
						});
					}

				}
				$("#info_list").html( html||'<li  style=\'text-align:center;background: #f8f8f8;\'><img src=\"../images/nondata.png\"></li><li style=\'text-align:center;background: #f8f8f8;\'>暂无数据</li>' )
			}
		});
	},
	goback : function (){
		window.location.href="../jsp/zukeKongjian.html";
	},
	toLink : function (txt,tagrt) {
		document.location.href = "./" + txt;
	}
})